/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2024-01-11
 * Time: 16:00
 */
public class test {
    public static void main(String[] args) {
////        String str="abcdefgh4i";
////        System.out.println(str.indexOf("4"));
////        System.out.println(str.indexOf(97));
//        String str = "hello world hello bit" ;
//        String[] result = str.split(" ",2) ; // 按照空格拆分
//        for(String s: result) {
//            System.out.println(s);
//        }
// 数字转字符串
        String s1 = String.valueOf(1234);
        String s2 = String.valueOf(12.34);
        String s3 = String.valueOf(true);
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
        System.out.println("=================================");
// 字符串转数字
// 注意：Integer、Double等是Java中的包装类型，这个后面会讲到
        int data1 = Integer.parseInt("1234");
        double data2 = Double.parseDouble("12.34");
        System.out.println(data1);
        System.out.println(data2);
        System.out.println(33&33);
        System.out.println(33|33);
        System.out.println(33^33);
    }
}